package com.zhuizikejithreeig.cn.adapter;
import android.widget.TextView;
import com.zhuizikejithreeig.cn.been.NoticeBeen;
import com.zhuizikejithreeig.cn.threeigkeji.R;
import java.util.Date;
import java.util.List;
/**
 * Created by 赵航 on 2018/2/27.
 */
public class EmailRecycleAdapter extends BasicRecycleViewAdapter<NoticeBeen.DataBean> {
    private String                    data;
    private List<NoticeBeen.DataBean> mList;
    public EmailRecycleAdapter(String getData, List<NoticeBeen.DataBean> showItems) {
        super(showItems);
        this.data = getData;
        this.mList = showItems;
    }
    @Override
    public void convert(BasicViewholder holder, NoticeBeen.DataBean itm, int position) {
        TextView title = (TextView) holder.getView(R.id.title);
        TextView textdata = (TextView) holder.getView(R.id.data);
        TextView content = (TextView) holder.getView(R.id.content);
        Date date=new Date(itm.getTime());
        title.setText(itm.getTitle());
        textdata.setText((date.getMonth()+1)+"-"+date.getDay());
        content.setText(itm.getCon());
    }
    @Override
    public int getSuccessFullView(int viewType) {
        return R.layout.notice_layout;
    }
}
